//
//  Cat.m
//  指纹识别
//
//  Created by lzy on 2018/4/23.
//  Copyright © 2018年 lzy. All rights reserved.
//

#import "Cat.h"
#import <objc/runtime.h>
#import <objc/message.h>
@implementation Cat
//方法交换 Method Swizzling
+ (void)load{
    Method eatMethod = class_getInstanceMethod(self, @selector(eat));
    Method shirtMethod = class_getInstanceMethod(self, @selector(shirt));
    
    method_exchangeImplementations(eatMethod, shirtMethod);
    
    
}



- (void)shirt{
    NSLog(@"cat shirt....");
}

-(void)eat
{
    NSLog(@"dog have eat!!!");
}
@end
